﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace STSdb.MTL.Utils.Async
{
    public class AsyncOperations
    {
        public static void DoAsync(Action f)
        {
            IAsyncResult ar = f.BeginInvoke(x =>
            {
                //if (x.IsCompleted)
                //{

                //}
                f.EndInvoke(x);
            }, null);
        }

        public static void DoAsync<TInput>(Action<TInput> f, TInput arg)
        {
            f.BeginInvoke(arg, x =>
            {
                f.EndInvoke(x);

            }, null);
        }
    }
}
